package carnet;

import java.util.ArrayList;

public class Carnet {
	String type;
	ArrayList<Contact> contacts;
	
	public Carnet(String t){
		type = t;
		contacts = new ArrayList<Contact>();
	}
	
	public Carnet(String t, ArrayList<Contact> c){
		type = t;
		contacts = c;
	}
	
	public void addContact(Contact c){
		contacts.add(c);
	}
	
	// -------------------------------------
	// Getters / Setters
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	public ArrayList<Contact> getContacts() {
		return contacts;
	}

	public void setContacts(ArrayList<Contact> contacts) {
		this.contacts = contacts;
	}
	
	// Visitor
	public void accept(Visitor v){
		v.visitCarnet(this);	
	}
}
